<?php
/**
 * Created by PhpStorm.
 * User: zhaoq02
 * Date: 2015-04-29
 * Time: 16:19
 */
use business\sso\services\OnlineUserService;
use business\user\services\UserService;
use common\utils\DomainUtil;
use  business\user\types\CompanyType;
?>
<?php $this->beginContent('@app/views/layouts/siteNav.php'); ?><?php $this->endContent(); ?>
<div id="header">
    <div class="wrap clear">
        <h3 class="logo"><a href="<?= DomainUtil::getDomainLink("MainPage", "/") ?>" title="明源地产采购"><img
                    src="<?= DomainUtil::getDomainLink("JcsStatic", "/res1.5/img/common/layout/logo.png") ?>"
                    alt="明源地产采购"/></a></h3>

        <div class="search_tabbar">
            <div class="s_tab">
                <ul class="items">
                    <li data-module="recruit" data-url="zm" data-placehoder="请输入招募信息或开发商"><a href="#">招募</a></li>
                    <li data-module="announcement" data-url="bidding" data-placehoder="请输入招标信息或开发商"><a href="#">招标</a>
                    </li>
                    <li data-module="supplier" data-url="supplier" data-placehoder='同时搜索多个词用空格隔开, 如: "深圳 门窗"'><a
                            href="#">供应商</a></li>
                    <li data-module="developer" data-url="developer" data-placehoder="请输入开发商"><a href="#">开发商</a></li>
                </ul>
            </div>
            <p class="panel">
                <input type="text" id="searchTxt" class="txt_common" value="" placeholder="请输入产品/服务或供应商"
                       data-domain="<?= DomainUtil::getDomainLink("Search", "/") ?>"/>
                <input type="button" id="searchBtn" class="btn_common" value="搜索"/>
            </p>
            <!-- 此功能内容暂时去除，后面迭代才会考虑加入，
                <p class="search_hot">
                    <strong class="hot_title">搜索热词：</strong> <a href="#">水泥</a> <a href="#">电梯</a> <a href="#">水管</a> <a href="#">钢材</a>
                </p>
                -->
            <script
                src='<?= DomainUtil::getDomainLink("JcsStatic", "/res1.5/plugins/placeholder/jquery.placeholder.js") ?>'></script>
            <script
                src='<?= DomainUtil::getDomainLink("JcsStatic", "/js/search/jquery.ui.custom.min.1.10.3.js") ?>'></script>
            <script src='<?= DomainUtil::getDomainLink("JcsStatic", "/res1.5/js/common/nav-search.js") ?>'></script>
        </div>
        <!-- 右侧：登录、注册按钮 -->
        <p class="login_buttons" id="login_register_btns">
            <a href="<?= DomainUtil::getDomainLink("Login", "/") ?> " rel="nofollow" class="btn_common btn_login">登
                录</a>
            <a href="<?= DomainUtil::getDomainLink("Register", "/") ?>" rel="nofollow"
               class="btn_common btn_reg">免费注册</a>
        </p>
        <!-- end -->
        <script>
            (function ($) {
                function getCookieInfo(name) {
                    var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
                    if (arr = top.document.cookie.match(reg)) {
                        return unescape(arr[2]);
                    } else {
                        return "";
                    }
                };
                var type = getCookieInfo("companyType") + "";
                if (type == "1" || type == "2") {
                    $("#login_register_btns").hide();
                } else {
                    $("#site_nav").hide();
                }
            })($);
        </script>
    </div>
</div>
